package com.myway.controller;

import com.myway.dto.common.JsonData;
import com.myway.pojo.SysFootColumn;
import com.myway.service.FootService;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created by yufei on 2018/1/15.
 */
@Controller
@Slf4j
@RequestMapping("/en/foot")
public class FootControllerEn {

    @Autowired
    private FootService footService;

    /**
     * 加载首页foot栏目
     * @param type
     * @return
     */
    @RequestMapping("/page")
    @ResponseBody
    public JsonData page(@Param("type") String type){
       List<SysFootColumn> result = footService.page(type);
        return JsonData.success(result);
    }
}
